package com.dong.repeatsubmit.redis;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

@Component
public class AppRedisService extends RedisService {
    @Value("${spring.profiles.active}")
    String activeProfile;
    @Value("${spring.application.name}")
    String applicationName;
    public AppRedisService(RedisTemplate<String,Object> redisTemplate) {
        this.redisTemplate = redisTemplate;
    }

    @Override
    protected String getKey(String key) {
        return this.bulidKey(activeProfile,applicationName,key);
    }
}
